package cn.webrx;

import cn.webrx.mapper.DbMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan({"cn.webrx.mapper"})
public class App implements ApplicationRunner {
    @Autowired
    private DbMapper dm;

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.printf("hello world %s%n", SpringBootVersion.getVersion());
        System.out.println(dm.dbs());
        System.out.println(dm.tbs());
    }
}
